ConcurrentDictionary(TKey, TValue) Class

Task Parallel System.Threading

Represents a thread-safe collection of keys and values.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
<ComVisibleAttribute(False)> _
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True,  _
	ExternalThreading := True)> _
Public Class ConcurrentDictionary(Of TKey, TValue) _
	Implements IDictionary(Of TKey, TValue), ICollection(Of KeyValuePair(Of TKey, TValue)),  _
	IEnumerable(Of KeyValuePair(Of TKey, TValue)), IDictionary,  _
	ICollection, IEnumerable
C#
[SerializableAttribute]
[ComVisibleAttribute(false)]
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
	ExternalThreading = true)]
public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IDictionary, ICollection, IEnumerable

Type Parameters

TKey
The type of the keys in the dictionary.
TValue
The type of the values in the dictionary.

Remarks

All public and protected members of ConcurrentDictionary<(Of <(TKey, TValue>)>) are thread-safe and may be used concurrently from multiple threads.

Inheritance Hierarchy

System..::.Object
  System.Collections.Concurrent..::.ConcurrentDictionary<(Of <(TKey, TValue>)>)

See Also